<?php
// @filename   js_helper.php
// @version    1.0
// @author     洪明伟@shstorm
// @contact    hongmingwei@shstorm.com
// @update     2009-08-81
// @comment    js辅助函数

//js alert popup
function js_alert($str)
{
    echo "<script type='text/javascript'>window.alert('".$str."');</script>";
}

//js goback function
function js_back()
{
    echo "<script type='text/javascript'>window.history.back();</script>";
}

//js goto an appointed url
function js_go($url)
{
    echo "<script type='text/javascript'>window.location.href='".$url."';</script>";
}
?>